package puzzle.game.project;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

public class GetOption extends Activity implements OnClickListener {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
    	setContentView(R.layout.option);
    	
		View getEasy = this.findViewById(R.id.geteasy);
		getEasy.setOnClickListener(this);
		
		View getMedium = this.findViewById(R.id.getmedium);
		getMedium.setOnClickListener(this);
		
		View getHard = this.findViewById(R.id.gethard);
		getHard.setOnClickListener(this);
    }
    
	public void onClick(View v){
		Intent mIntent = new Intent(); 		

		switch (v.getId()){
		case R.id.geteasy:			
			mIntent.putExtra("selectedOption", 3);
			break;
		case R.id.getmedium:			
			mIntent.putExtra("selectedOption", 4);
			break;
		case R.id.gethard:			
			mIntent.putExtra("selectedOption", 5);
			break;
		}
		setResult(RESULT_OK, mIntent);
		finish();
	}
}
